﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;

namespace PlantsZombies.Common.Plant
{
    [PlantZombie(SpeciesType.ZhangFei)]
    public class GameZhangFei : PlantObject
    {
        public GameZhangFei(ImageObject[] images)
            : base(images,SpeciesType.ZhangFei, 18,4, new Size(180, 180))
        {
        }
        protected override void PlayBody(IntPtr hdc)
        {
            var image = _images[_curPlayIndex];
            GDI32.DrawImageTransparenc(hdc, image.BitmapPtr, Location.X + (CellWidth - Size.Width) / 3+(int)(20*ZoomX), Location.Y - CellHeight-(int)(10 * ZoomY), image.Width, image.Height, Size.Width, Size.Height);
            if (++_curPlayIndex >= _images.Length)
                _curPlayIndex = 0;
        }
    }
}
